<div id="Magic-branch-numbers"></div>
<div class="header">
<p>
Next: [[cvs: Merging an entire branch#Merging an entire branch|Merging a branch]], Previous: [[cvs: Branches and revisions#Branches and revisions|Branches and revisions]], Up: [[cvs: Branching and merging#Branching and merging|Branching and merging]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Magic-branch-numbers-1"></div>
=== Magic branch numbers ===


This section describes a <small>CVS</small> feature called
<em>magic branches</em>.  For most purposes, you need not
worry about magic branches; <small>CVS</small> handles them for
you.  However, they are visible to you in certain
circumstances, so it may be useful to have some idea of
how it works.

Externally, branch numbers consist of an odd number of
dot-separated decimal integers.  See [[cvs: Revision numbers#Revision numbers|Revision numbers]].  That is not the whole truth, however.  For
efficiency reasons <small>CVS</small> sometimes inserts an extra 0
in the second rightmost position (1.2.4 becomes
1.2.0.4, 8.9.10.11.12 becomes 8.9.10.11.0.12 and so
on).

<small>CVS</small> does a pretty good job at hiding these so
called magic branches, but in a few places the hiding
is incomplete:


* The magic branch number appears in the output from <code>cvs log</code>.


* You cannot specify a symbolic branch name to <code>cvs admin</code>.


You can use the <code>admin</code> command to reassign a
symbolic name to a branch the way <small>RCS</small> expects it
to be.  If <code>R4patches</code> is assigned to the branch
1.4.2 (magic branch number 1.4.0.2) in file
&lsquo;<tt>numbers.c</tt>&rsquo; you can do this:

<div class="example" style="margin-left: 3.2em">
 $ cvs admin -NR4patches:1.4.2 numbers.c
</div>

It only works if at least one revision is already
committed on the branch.  Be very careful so that you
do not assign the tag to the wrong number.  (There is
no way to see how the tag was assigned yesterday).

This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
